From: Platonides Date: Tue, 26 Jun 2012 16:58:37 +0000 (+0200) Subject: Disable the db LCStore if the maintenance script doesn't need a db. X-Git-Tag: 1.31.0-rc.0~23203^2~1 X-Git-Url: http://git.cyclocoop.org/%28%5B%5E/404?a=commitdiff_plain;h=1bb25971f27ac17d3a006452840f7e39f1ff7e78;p=lhc%2Fweb%2Fwiklou.git Disable the db LCStore if the maintenance script doesn't need a db. If $wgLanguageCode != 'en', loading of the language class will go to the LCStore looking for the fallbacks, even if the script doesn't need a database. Change-Id: I6a1920ba02d146622f3a5647bf02ddec3e3da54b --- diff --git a/maintenance/doMaintenance.php b/maintenance/doMaintenance.php index 6b29c5fd54..2bb2a0f447 100644 --- a/maintenance/doMaintenance.php +++ b/maintenance/doMaintenance.php @@ -93,6 +93,11 @@ if ( $maintenance->getDbType() === Maintenance::DB_ADMIN && { require( MWInit::interpretedPath( 'AdminSettings.php' ) ); } + +if ( $maintenance->getDbType() === Maintenance::DB_NONE ) { + if ( $wgLocalisationCacheConf['storeClass'] === false && ( $wgLocalisationCacheConf['store'] == 'db' || ( $wgLocalisationCacheConf['store'] == 'detect' && !$wgCacheDirectory ) ) ) + $wgLocalisationCacheConf['storeClass'] = 'LCStore_Null'; +} $maintenance->finalSetup(); // Some last includes require_once( MWInit::compiledPath( 'includes/Setup.php' ) );